package com.project.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 商品
 * @author 
 */
@Data
@TableName(value = "cms_product")
@Table(name = "cms_product", comment = "商品")
public class CmsProduct implements Serializable {
    /**
     * 产品ID
     */
    @TableId
    @Column(type= MySqlTypeConstant.BIGINT, comment = "产品ID", length = 11, isKey = true, isAutoIncrement = true,isNull = false)
    private Long productId;

    /**
     * 产品类目ID
     */
    @Column(comment = "产品类目ID产品类目ID")
    private Long categoryId;

    /**
     * 产品二级类目
     */
    @Column(comment = "产品二级类目")
    private Long categoryTwoId;

    /**
     * 产品名称
     */
    @Column(comment = "产品名称")
    private String name;

    /**
     * 商品编码
     */
    @Column(comment = "商品编码")
    private String productCode;

    /**
     * 简介
     */
    @Column(comment = "简介")
    private String summary;

    /**
     * 产品图片
     */
    @Column(comment = "产品图片", length = 3000)
    private String productImg;

    /**
     * 产品详情
     */
    @Column(comment = "产品详情", length = 3000)
    private String content;

    /**
     * 售价
     */
    @Column(comment = "售价", defaultValue = "0.00", type = MySqlTypeConstant.DECIMAL, length = 18, decimalLength = 2)
    private BigDecimal price;

    /**
     * 原价
     */
    @Column(comment = "原价", defaultValue = "0.00", type = MySqlTypeConstant.DECIMAL, length = 18, decimalLength = 2)
    private BigDecimal originalPrice;

    /**
     * 供货价
     */
    @Column(comment = "供货价", defaultValue = "0.00", type = MySqlTypeConstant.DECIMAL, length = 18, decimalLength = 2)
    private BigDecimal favorablePrice;

    /**
     * 品牌
     */
    @Column(comment = "品牌")
    private String brand;

    /**
     * 供应商ID
     */
    @Column(comment = "供应商ID")
    private Long supplierId;

    /**
     * 供应商
     */
    @Column(comment = "供应商")
    private String supplier;

    /**
     * 产品单位
     */
    @Column(comment = "产品单位")
    private String unit;

    /**
     * 产地
     */
    @Column(comment = "产地")
    private String productOrigin;

    /**
     * 库存
     */
    @Column(comment = "库存", defaultValue = "0")
    private Integer stock;

    /**
     * 销量
     */
    @Column(comment = "销量", defaultValue = "0")
    private Integer sales;

    /**
     * 评价数量
     */
    @Column(comment = "评价数量", defaultValue = "0")
    private Integer praise;

    /**
     * 浏览量
     */
    @Column(comment = "浏览量", defaultValue = "0")
    private Integer views;

    /**
     * 排序
     */
    @Column(comment = "排序")
    private Integer sort;

    /**
     * 驳回理由
     */
    @Column(comment = "驳回理由")
    private String rejectReason;

    /**
     * 创建人
     */
    @Column(comment = "创建人")
    private Long createUser;

    /**
     * 创建时间
     */
    @Column(comment = "创建时间", type = MySqlTypeConstant.DATETIME)
    private Date createTime;

    /**
     * 修改人
     */
    @Column(comment = "修改人")
    private Long updateUser;

    /**
     * 修改时间
     */
    @Column(comment = "修改时间", type = MySqlTypeConstant.TIMESTAMP)
    private Date updateTime;

    /**
     * 状态（0:下架,1:上架）
     */
    @Column(comment = "状态（0:下架,1:上架）", defaultValue = "0")
    private Integer state;

    /**
     * 删除标志（-1:删除,1:正常）
     */
     @Column(comment = "删除标志（-1:删除,1:正常）", defaultValue = "1")
    private Integer status;

    private static final long serialVersionUID = 1L;

}